﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YiYiTong.Rocket.Entity;
using YiYiTong.Rocket.Helper;

namespace YiYiTong.Rocket.Model
{

    public class GoodsListModel
    {
        public int allrows { get; set; }
        public int allpages { get; set; }
        public List<GoodsModel> list { get; set; } = new List<GoodsModel>();
    }

    public class GoodsModel
    {
        public long goods_id { get; set; }
        /// <summary>
        /// 料号
        /// </summary>
        public string MPN { get; set; }
        /// <summary>
        /// 商品单位
        /// </summary>
        public string goods_unit { get; set; }

        public string brand_name { get; set; }

        public string category_name { get; set; }

        public string DCN { get; set; }

        public string DDD { get; set; }
        /// <summary>
        /// 供应商
        /// </summary>
        public string supplier_name { get; set; }
        /// <summary>
        /// 库存日期
        /// </summary>
        public string stock_date { get; set; }
        /// <summary>
        /// 商品描述
        /// </summary>
        public string product_desc { get; set; }
        /// <summary>
        /// 库存
        /// </summary>
        [JsonConverter(typeof(DecimalFormatJsonConverter))]
        public decimal stock_amount { get; set; }
        /// <summary>
        /// 最小订购量
        /// </summary>
        [JsonConverter(typeof(DecimalFormatJsonConverter))]
        public decimal min_amount { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal price { get; set; }
        /// <summary>
        /// 市场价
        /// </summary>
        public decimal market_price { get; set; }
        /// <summary>
        /// 会员查看的最低等级，默认0，此值和会员等级一致
        /// </summary>
        public short show_min_level { get; set; }
        /// <summary>
        /// 倒计时结束时间
        /// </summary>
        public DateTime end_time { get; set; }
        /// <summary>
        /// 1 直播 2 预热 3 爆款
        /// </summary>
        public int label_type { get; set; }
        public int base_label_type { get; set; }
        /// <summary>
        /// 预定报价
        /// </summary>
        public decimal place_price { get; set; }

        /// <summary>
        /// 是否含税 0未含税 1含税
        /// </summary>
        public short include_tax { get; set; }

        /// <summary>
        /// 货币类型 0 人民币 1 美元
        /// </summary>
        public short currency_type { get; set; }

        /// <summary>
        /// 上架时间
        /// </summary>
        public DateTime with_up_time { get; set; }

        /// <summary>
        /// 是否最新上架，上架时间为当天，当=1 最新
        /// </summary>
        public int is_new { get; set; }

        public List<GoodsIMG> imglist { get; set; }
    }

    /// <summary>
    /// 分享信息
    /// </summary>
    public class ShareGoodsListModel
    {
        public GoodsListModel goodsList { get; set; } = new GoodsListModel();
        public string share_title { get; set; } = "";
    }
}
